﻿@model CmsModuleModel


    <fieldset class="b-form">
        <ol class="b-form__rows ul-reset g-clear">
            <li class="b-form__row g-clear">
                @Html.ValidationMessageFor(m => m.ModuleName)
                <label for="@Html.GetClientIdFor(m => m.ModuleName)">Module name</label>
                @Html.TextBoxFor(p => p.ModuleName, new {@class = "text"})            
            </li>
            <li class="b-form__row g-clear">
                <label for="@Html.GetClientIdFor(m => m.ModuleDescription)">Description</label>
                @Html.TextAreaFor(p => p.ModuleDescription)            
            </li>
            <li class="b-form__row g-clear">
                <label for="@Html.GetClientIdFor(m => m.ControlType)">Page Control Type</label>
                @Html.DropDownListFor(p => p.ControlType, Model.AvailableTypes, new {@class = "js-select-show-hide", data_container = ".js-control-type"})            
            </li>

            <li class="b-form__row g-clear js-mvcaction js-control-type">
                @Html.ValidationMessageFor(m => m.ActionController)
                <label for="@Html.GetClientIdFor(m => m.ActionController)">Controller</label>
                @Html.TextBoxFor(p => p.ActionController, new {@class = "text"})            
            </li>
            <li class="b-form__row g-clear js-mvcaction js-control-type">
                <label for="@Html.GetClientIdFor(m => m.ActionName)">Action</label>
                @Html.TextBoxFor(p => p.ActionName, new {@class = "text"})
            </li>        
            <li class="b-form__row g-clear js-mvcpartial js-control-type">
                @Html.ValidationMessageFor(m => m.PartialViewName)
                <label for="@Html.GetClientIdFor(m => m.PartialViewName)">Partial View Name</label>
                @Html.TextBoxFor(p => p.PartialViewName, new {@class = "text"})
            </li>
            <li class="b-form__row g-clear">
                <label for="@Html.GetClientIdFor(m => m.PartialAdministrationViewName)">Administration View</label>
                @Html.TextBoxFor(p => p.PartialAdministrationViewName, new { @class = "text" })
            </li>
            <li class="b-form__row g-clear">
                <label for="@Html.GetClientIdFor(m => m.PartialModelType)">Model Type</label>
                @Html.TextBoxFor(p => p.PartialModelType, new {@class = "text"})
            </li>
            @(Html.UserGroupPlaceholder().ForUserGroups(PredefinedUserGroups.Developer).Template(
                @<text>
                    <li class="b-form__row g-clear">
                        <label>Module scope</label>
                        @Html.Partial("SiteAwarePlug", Model)
                    </li>
                </text>)
                .AlternativeTemplate(
                @<text>
                    <li class="b-form__row g-clear" style="display:none">
                        <label>Module scope</label>
                        @Html.Partial("SiteAwarePlug", Model)
                    </li>
                </text>)
                .Render())
        </ol>               
        <ol class="ul-reset g-clear">
            <li class="b-form__row g-clear">            
                @Html.HiddenFor(p => p.Id)            
                <input class="b-button" id="btnSave" name="btnSave" type="submit" value="Save" />
            </li>
        </ol>
    </fieldset>
